# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

inherit eutils qt4 subversion flag-o-matic
MY_PN="${PN/qutim-/}"

DESCRIPTION="Yandex.Narod plugin for net-im/qutim"
HOMEPAGE="http://boiler.co.ru/qutim"
LICENSE="GPL-2"

SRC_URI=""
ESVN_REPO_URI="https://boiler.co.ru/svn/${PN}"

SLOT="live"
KEYWORDS=""
IUSE="debug"

RDEPEND="net-im/qutim:live"
DEPEND="${RDEPEND}
	!x11-plugins/qutim-yandexnarod:0.2"

RESTRICT="mirror
	debug? ( strip )"

S="${WORKDIR}/${MY_PN}"

src_unpack()
{
	subversion_src_unpack
}

src_prepare() 
{
	if (use debug) ; then
                unset CFLAGS CXXFLAGS
                append-flags -O1 -g -ggdb
        fi
}

src_compile()
{
	eqmake4 ${MY_PN}.pro || die "configure plugin failed"
	emake || die "make plugin failed"
}

src_install()
{
	insinto /usr/$(get_libdir)/qutim
	doins "${S}/lib${MY_PN}.so" || die "Plugin installation failed"
}
